home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 7 / BBS in a Box - Macintosh - Volume VII (BBS in a Box) (January 1993).iso / Files / Movie / Q-Z / VCR 2.0.cpt / VCR 2.0 / stack.txt < prev   
Text File  |  1990-04-09  |  7KB  |  256 lines

  1. -- stack: in.0
  2. -- format: 8 (HyperCard 1)
  3. -- flags: 0x1000 (none)
  4. -- protect password hash: 0
  5. -- maximum user level: 5 (scripting)
  6. -- window: Rect(x1=0, y1=0, x2=0, y2=0)
  7. -- screen: Rect(x1=0, y1=0, x2=0, y2=0)
  8. -- card dimensions: w=0 h=0
  9. -- scroll: x=0 y=0
  10. -- background count: 3
  11. -- first background id: 2707
  12. -- card count: 5
  13. -- first card id: 19674
  14. -- list block id: 2528
  15. -- print block id: 3369
  16. -- font table block id: 0
  17. -- style table block id: 0
  18. -- free block count: 0
  19. -- free size: 0 bytes
  20. -- total size: 26016 bytes
  21. -- stack block size: 6144 bytes
  22. -- created by hypercard version: 0x00000000
  23. -- compacted by hypercard version: 0x01228000
  24. -- modified by hypercard version: 0x01228000
  25. -- opened by hypercard version: 0x01228000
  26. -- patterns[0]: 0x0000000000000000
  27. -- patterns[1]: 0x0000220000002200
  28. -- patterns[2]: 0x8800220088002200
  29. -- patterns[3]: 0xCC003300CC003300
  30. -- patterns[4]: 0xCC883322CC883322
  31. -- patterns[5]: 0xEE88BB22EE88BB22
  32. -- patterns[6]: 0xEECCBB33EECCBB33
  33. -- patterns[7]: 0xFFCCFF33FFCCFF33
  34. -- patterns[8]: 0xFFEEFFBBFFEEFFBB
  35. -- patterns[9]: 0xFFFFFFBBFFFFFFBB
  36. -- patterns[10]: 0x8010022001084004
  37. -- patterns[11]: 0xFFFFFFFFFFFFFFFF
  38. -- patterns[12]: 0x8822882288228822
  39. -- patterns[13]: 0x1122448811224488
  40. -- patterns[14]: 0xC4800C6843023026
  41. -- patterns[15]: 0xB130031BD8C00C8D
  42. -- patterns[16]: 0xAA00AA00AA00AA00
  43. -- patterns[17]: 0x8822552288225522
  44. -- patterns[18]: 0x8855225588552255
  45. -- patterns[19]: 0x77DD77DD77DD77DD
  46. -- patterns[20]: 0x8000000000000000
  47. -- patterns[21]: 0xAA55AA55AA55AA55
  48. -- patterns[22]: 0x038448300C020101
  49. -- patterns[23]: 0x8244394482010101
  50. -- patterns[24]: 0x8814224188412214
  51. -- patterns[25]: 0x8080413E080814E3
  52. -- patterns[26]: 0x22048C7422179810
  53. -- patterns[27]: 0xBE808808EB088880
  54. -- patterns[28]: 0x25C8328964244C92
  55. -- patterns[29]: 0xA29C41BE2AC914EB
  56. -- patterns[30]: 0x40A00000040A0000
  57. -- patterns[31]: 0x8040200002040800
  58. -- patterns[32]: 0xAA00800088008000
  59. -- patterns[33]: 0xFF80808080808080
  60. -- patterns[34]: 0x081C22C180010204
  61. -- patterns[35]: 0xFF808080FF080808
  62. -- patterns[36]: 0xF87422478F172271
  63. -- patterns[37]: 0xBF00BFBFB0B0B0B0
  64. -- patterns[38]: 0xFF7FBE5DA2418000
  65. -- patterns[39]: 0xFAF5FAF5A050A050
  66. -- checksum: 0x0
  67. ----- HyperTalk script -----
  68. on openStack
  69.   push card
  70.   if the number of this cd is 1 then hide cd fld data
  71.   hide message box
  72.   show menuBar
  73.   play darn
  74.   pass openStack
  75. end openStack
  76.  
  77. function frac m
  78. return m - trunc(m)
  79. end frac
  80.  
  81. function sortl arg
  82. -- ascending sort
  83. put number of items of arg into n
  84. repeat with j=1 to n-1
  85.   put true into done
  86.   repeat with i=j to n
  87.     if item i of arg < item j of arg then
  88.       put false into done
  89.       set cursor to busy
  90.       put item i of arg into z
  91.       put item j of arg into item i of arg
  92.       put z into item j of arg
  93.     end if
  94.   end repeat
  95.   if done then exit repeat
  96. end repeat
  97. return arg
  98. end sortl
  99.  
  100. function begNum
  101. return number of first card of bg "Movies"
  102. end begNum
  103.  
  104. on closeField
  105.   if number of this cd > 5 then calc
  106. end closeField
  107.  
  108. on search
  109.   global itt
  110.   if itt is not empty then go next card
  111.   ask "Search for character string:" with itt
  112.   if it is not empty then
  113.     find chars it in fld Movies
  114.     if the result is "not found" then
  115.       play clang tempo 250 c4 d3
  116.     end if
  117.   end if
  118.   put it into itt
  119. end search
  120.  
  121. on calc
  122.   put empty into z
  123.   put (last line of field "Counter"+fld strip)/1000 into x
  124.   if hilite of button "VHS" then
  125.     put "VHS" into init
  126.   else
  127.     if hilite of button "Beta"
  128.     then put "Beta" into init
  129.   end if
  130.   put trunc((line 1 of field 3 of card init) + x * ((line 2 of field 3 of card init) + x * line 3 of field 3 of card init))/60 into timeLeft
  131.   put round(60 * frac(timeLeft)) into minutes
  132.   if minutes <10 then put "0" into z
  133.   put trunc(timeLeft) & ":" & z & minutes into field "Time Left"
  134. end calc
  135.  
  136. on goTape
  137.   global tape
  138.   if tape is empty then
  139.     ask "Go to videotape #" with "1"
  140.     put it into tape
  141.   end if
  142.   if tape is empty then exit GoTape
  143.   put false into found
  144.   if (last char of tape) is "," then delete last char of tape
  145.   go cd "x"&tape
  146.   if the result is "No such card" then play boing
  147. end goTape
  148.  
  149. on NuCard
  150.   global num
  151.   go last cd
  152.   put field "num" into num
  153.   DoMenu "Copy Card"
  154.   DoMenu "Paste Card"
  155.   repeat with i=1 to (the number of flds) -1
  156.     if fld i is not empty then
  157.       select text of fld i
  158.       doMenu "Clear Text"
  159.     end if
  160.   end repeat
  161.   Answer "Please select a tape format..." with "VHS" or "Beta-500" or "Beta"
  162.   if it is "Beta" then
  163.     set hilite of button "Beta" to true
  164.     set hilite of button "VHS" to false
  165.   else
  166.     set hilite of button "VHS" to true
  167.     set hilite of button "Beta" to false
  168.   end if
  169.   calc
  170. end NuCard
  171.  
  172. on searchTime
  173.   global start,num,i,she,buffer,dest,list
  174.   repeat with i=start to num
  175.     set cursor to busy
  176.     put field "Time Left" of card i into time
  177.     if the number of chars of time = 5 then exit repeat
  178.     put 60*char 1 of time + (char 3 to 4 of time) into time2
  179.     if time2 > she then
  180.       if buffer‚â†0 then
  181.         put time2-she+.1 into buffer
  182.         put "," after list
  183.         if buffer <100 then put "0" after list
  184.         if buffer <10 then put "0" after list
  185.         put trunc(buffer) &"." after list
  186.         if i<10 then put "0" after list
  187.         put i after list
  188.       else
  189.         put "," & i after list
  190.       end if
  191.       exit repeat
  192.     end if
  193.   end repeat
  194.   if buffer=0 and i=num then
  195.     play boing
  196.     go recent card
  197.     put 1 into i
  198.   end if
  199. end searchTime
  200.  
  201. on FindTime
  202.   global start,num,i,buffer,she,dest,list
  203.   put 0 into buffer
  204.   put 0 into dest
  205.   get 0
  206.   push card
  207.   put begNum() into list
  208.   put begnum() into start
  209.   put 240 into best
  210.   put the number of cards into num
  211.   repeat until it>0
  212.     Ask "How many minutes do you seek (1 to exit)?"
  213.   end repeat
  214.   put it into she
  215.   if she=1 then exit FindTime
  216.   Answer "Fill tape to end?" with "No" or "Yes"
  217.   if it is "Yes" then put -she into she
  218.   if she<0 then
  219.     put abs(she) into she
  220.     set cursor to 4
  221.     put begnum() into start
  222.     put 239 into buffer
  223.     searchTime
  224.     repeat until i=num
  225.       if buffer<best then
  226.         put i into dest
  227.         put buffer into best
  228.         go cd dest
  229.       end if
  230.       put i+1 into start
  231.       searchTime
  232.     end repeat
  233.     delete item 1 of list
  234.     put number of items of list into nlist
  235.     repeat with j=1 to nlist
  236.       if number of chars of (item j of list) is 1 then put "0" before item j of list
  237.     end repeat
  238.     put sortl(list) into list
  239.     repeat with j=2 to nlist
  240.       Answer "Less buffer?" with "No" or "Yes"
  241.       if it is "No" then exit repeat
  242.       go card (char 5 to 6 of item j of list)
  243.     end repeat
  244.   else
  245.     searchTime
  246.     repeat until i=1
  247.       go cd i
  248.       Answer "Seek Another?" with "No" or "Yes"
  249.       if it is "No" then exit repeat
  250.       put i+1 into start
  251.       searchTime
  252.     end repeat
  253.   end if
  254. end FindTime
  255.  
  256.